package com.kurancy.web.authentication.service;

import javax.servlet.http.HttpServletRequest;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;

import com.kurancy.domain.KurancyUser;

@Service
public interface AuthService {

	public void cacheFacebookAuthentication(KurancyUser registeredKurancyUser, HttpServletRequest request);

	public abstract UserDetails retrieveUser(String token, UsernamePasswordAuthenticationToken usernamePasswordToken) throws AuthenticationException;

	public void cacheNonFacebookAuthentication(Authentication storedAuth, HttpServletRequest request);

	public KurancyUser getKurancyUser();

	public void updatePaypalCredentials(String trim);

}
